import Vue from 'vue'
import App from './App'
import router from './router'

import BootstrapVue from 'bootstrap-vue'
import iView from 'iview'
import TreeView from 'vue-json-tree-view'

import globals from './globals'
import Popper from 'popper.js'
import SkyNotifications from './commComponents/notification/index'
import SkyPagination from './commComponents/pagination/pagination'
import SkyTable from './commComponents/table/table'
import SkyToolItem from './commComponents/toolItem/ToolItem'
import store from './store'
import './mock'
import svgicon from 'vue-svgicon'
import '@/axios/http'

import './vendor/styles/bootstrap.scss'
import './vendor/styles/appwork.scss'
import './vendor/styles/theme-corporate.scss'
import './vendor/styles/colors.scss'
import './vendor/styles/uikit.scss'

// Vue中央事件总线
Vue.prototype.EventOperator = new Vue()

// Required to enable animations on dropdowns/tooltips/popovers
Popper.Defaults.modifiers.computeStyle.gpuAcceleration = false

Vue.config.productionTip = false

Vue.use(TreeView)
Vue.use(BootstrapVue)
Vue.use(iView)
Vue.use(SkyNotifications)
Vue.use(svgicon, {
  tagName: 'svgicon'
})

// 注册通用组件
Vue.component('sky-pagination', SkyPagination)
Vue.component('sky-table', SkyTable)
Vue.component('sky-tool-item', SkyToolItem)

// Global RTL flag
Vue.mixin({
  data: globals
})

/* eslint-disable no-new */
export default  new Vue({
  el: '#app',
  store,
  router,
  template: '<App/>',
  components: { App }
})
